home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 August: Tool Chest / Apple_Developer_Group_August_1996_Tool_Chest.iso / Sample Code / Interapplication Communication / MenuScripter 3.1 / Sources / PLStrs.c < prev   
Encoding:
C/C++ Source or Header  |  1995-11-20  |  664 b   |  37 lines  |  [TEXT/KAHL]

  1. /*
  2.     PLStrs.c
  3.     
  4.     Version 3.1
  5.     
  6.     Copyright © 1995 Apple Computer, Inc., all rights reserved.
  7.     
  8.     MenuScripter by Nigel Humphreys and Jon Lansdell
  9.     AppleEvent to script extensions by Greg Sutton
  10. */
  11.  
  12. #ifndef    __TYPES__
  13. #include <Types.h>
  14. #endif
  15. #include <memory.h>
  16.  
  17. pascal StringPtr     PLstrcpy(StringPtr str1, StringPtr str2)
  18.     {
  19.       BlockMove(str2, str1, str2[0] + 1);
  20.       return(str1);
  21.     }
  22.     
  23. pascal StringPtr    PLstrcat(StringPtr str1, StringPtr str2)
  24.     {
  25.         long copyLen;
  26.         
  27.       if (str1[0] + 1 + str2[0]>255)
  28.         copyLen = 255 - str1[0];
  29.       else
  30.           copyLen = str2[0];
  31.           
  32.       BlockMove(&str2[1], str1 + 1 + str1[0], copyLen);
  33.       str1[0] += copyLen;
  34.       
  35.       return(str1);
  36.     }
  37.